/**
 * 
 */
package ro.dta.idbi.interfaces.sql;

import java.util.List;

import com.mxgraph.model.mxICell;

/**
 * Interface for SQL foreign keys
 * 
 * @author Tudor Dobrila
 * 
 */
public interface ISqlForeignKey extends ISqlConstruct {

	/**
	 * Get the source of the foreign key
	 * 
	 * @return Source of the foreign key
	 */
	mxICell getSource();

	/**
	 * Get the target of the foreign key
	 * 
	 * @return Target of the foreign key
	 */
	mxICell getTarget();

	/**
	 * 
	 * @return List of columns in the source belonging to the constraint
	 */
	List<ISqlColumn> getSourceCols();

	/**
	 * 
	 * @return List of columns in the target belonging to the constraint
	 */
	List<ISqlColumn> getTargetCols();

	/**
	 * Add a column in the source columns list
	 * 
	 * @param column
	 *            Column to add in the source columns list
	 */
	void addSourceCol(ISqlColumn column);

	/**
	 * Add a column in the source columns list
	 * 
	 * @param column
	 *            Column to add in the source columns list
	 */
	void addTargetCol(ISqlColumn column);	
}
